<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="../js/angular.min.js" type="text/javascript"></script>
	</head>
	<body ng-app="myapp" ng-controller="myctrl">
		<table width="100%" border="1">
			<tr>
				<th>序号</th>
				<th>编号</th>
				<th>名称</th>
				<th>价格</th>
			</tr>		
			<tr ng-repeat="product in products">
				<td>{{index+1}}</td>
				<td>{{product.id}}</td>
				<td>{{product.name}}</td>
				<td>{{product.price}}</td>
			</tr>
		</table>
		<script type="text/javascript">
			/*angular.module("myapp",[]).controller("myctrl",function($scope){
				$scope.products=[
				{angular.module("myapp",[]).controller
					"id":1,
					"name":"华为",
					"price":3000
				},{
					"id":2,
					"name":"三星",
					"price":2000	
				}]
			});*/
			angular.module("myapp",[]).controller("myctrl",function($scope,$http){
				$http({
					method:'post',
					url:'../queryList'
				}).success(function(data){
					alert(JSON.stringify(data));
				});
			});
		</script>
	</body>
</html>
